const webp = require('webp-converter')
const fs = require('fs')
const path = require("path")

let fileList = fs.readdirSync("imgs")

console.log(fileList)

let result = webp.cwebp(path.join(__dirname, "imgs", fileList[0]),
    "test.webp",
    "-q 80",
    logging = "-v"
)

result.then((res) => {
    console.log(res)
})

